Synchronization of transparent TDM superchannels

ABSTRACT

Transparent Time Division Multiplexer (TDM) Superchannels including multiple time slots assigned to a single logical channel are synchronized between transmitter and receiver. For a given time slot in an idle logical channel (286), the transmitter only starts transmitting output if this is the first time slot assigned to the logical channel (288) and output is available for the logical channel (290). Starting to transmit output is postponed (289) if this is not the first time slot assigned to the logical channel. Correspondingly, the receiver only expects new data blocks to start in the first time slot assigned to the logical channel.

CROSS REFERENCE TO RELATED APPLICATION

This application is related to our copending patent application entitledMULTICHANNEL HDLC FRAMING/DEFRAMING MACHINE, filed Nov. 30, 1995, havingU.S. patent application Ser. No. 08/566,444, and assigned to theassignee hereof.

This application is related to our copending patent application entitledTRANSMISSION LOAD CONTROL FOR MULTICHANNEL HDLC TDM LINE, filed Nov. 30,1995, having U.S. patent application Ser. No. 08/566,443, and assignedto the assignee hereof.

CROSS REFERENCE TO RELATED APPLICATION

This application is related to our copending patent application entitledMULTICHANNEL HDLC FRAMING/DEFRAMING MACHINE, filed Nov. 30, 1995, havingU.S. patent application Ser. No. 08/566,444, and assigned to theassignee hereof.

This application is related to our copending patent application entitledTRANSMISSION LOAD CONTROL FOR MULTICHANNEL HDLC TDM LINE, filed Nov. 30,1995, having U.S. patent application Ser. No. 08/566,443, and assignedto the assignee hereof.

FIELD OF THE INVENTION

The present invention generally relates to data communications, and morespecifically to synchronizing Time Division Multiplexer (TDM)Superchannels comprising multiple time slots assigned to a singlelogical channel.

BACKGROUND OF THE INVENTION

Time Division Multiplexing (TDM) is a technique where multiple logicalchannels are multiplexed on a single physical channel. It operates byassigning fixed length time slots to different channels in a round robinfashion.

TDM Superchannels are a technique where a logical channel is assignedmore than one of the round robin time slots. If data becomes availablefor a Superchannel after its first time slot has been processed in around robin circuit, starting transmission of a new block of data inother than the first time slot assigned to the Superchannel may not berecognized as such by the receiver.

SUMMARY OF THE INVENTION

In accordance with the invention, transparent Time Division Multiplexer(TDM) Superchannels comprising multiple time slots assigned to a singlelogical channel are synchronized between transmitter and receiver. For agiven time slot in an idle logical channel, the transmitter only startstransmitting output if this is the first time slot assigned to thelogical channel and output is available for the logical channel.Starting to transmit output is postponed if this is not the first timeslot assigned to the logical channel. Correspondingly, the receiver onlyexpects new data blocks to start in the first time slot assigned to thelogical channel.

These and other features, and advantages, will be more clearlyunderstood from the following detailed description taken in conjunctionwith the accompanying drawings. It is important to point out that theremay be other embodiments of the present invention which are notspecifically illustrated.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the main components of an IntegratedCommunications System in accordance with the present invention;

FIG. 2 is a block diagram showing the major components in animplementation of a Communications Processor Module (CPM) shown in FIG.1;

FIG. 3 is a block diagram showing the main components of animplementation of a CPM RISC Controller shown in FIG. 2;

FIG. 4 is a block diagram showing the major components of the HDLCFramer module shown in FIG. 3;

FIG. 5 shows the CPM register sets in accordance with the presentinvention;

FIG. 6 is a timing diagram showing Framer timing in accordance with thepresent invention;

FIG. 7 is a flow chart showing invocation of the Framer Receiver (Rx)function in accordance with the present invention;

FIG. 8 is a flow chart showing invocation of the Framer Transmitter (Tx)function in accordance with the present invention;

FIG. 9 is a block diagram showing the major components of the Receiver(Rx) function in accordance with the present invention;

FIG. 10 is a state diagram showing the primary states and statetransitions of the Zero-Deletion machine in accordance with the presentinvention;

FIGS. 11 through 13 are flow charts showing a virtual implementation ofthe Framer Receive (Rx) function in accordance with the presentinvention;

FIG. 14 is a circuit block diagram showing the primary blocks utilizedin the preferred implementation of the Tx functionality in accordancewith the present invention;

FIGS. 15 through 17 are flow charts showing a virtual implementation ofthe Framer Transmit (Tx) function in accordance with the presentinvention;

FIG. 18 shows a memory map of the Dual Ported RAM (DPR) and ExternalMemory utilized by the CPM to control the Framer in accordance with thepresent invention;

FIGS. 19 and 20 are diagrams showing the operation of TDM Channels;

FIGS. 21 and 22 are block diagrams showing input and output operation ona TDM line in accordance with the present invention;

FIG. 23 is a block diagram that shows implementation of TDMSuperchannels in accordance with the present invention;

FIG. 24 is a block diagram showing the relationship among tables inMemory in accordance with the present invention; and

FIG. 25 is a flow chart that illustrates both throttle flag (7E)insertion and Superchannel synchronization in accordance with thepresent invention.

DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT

In a phone system, the multiplex equipment carrying the smallest numberof channels in the hierarchy of digital multiplexers is called theprimary multiplexer. In the U.S. network, the primary multiplex signalis called the Data Signaling Level 1 (DS-1) signal, and the transmissionsystem is called the T1 digital carrier system. As shown in Table T-1, aframe in the T1 system consists of 193 bits. The first bit is used toestablish the beginning of the frame ("framing bit"). Following it are192 bits comprising 24 (decimal) code words of eight bits each. Thereare 8,000 samples a second and each one generates a code word, thereforea code word occurs every 125μ Seconds. This is equivalent to 1.544megabits per second (Mbps).

                  TABLE T-1                                                       ______________________________________                                        Frame Structure for T1 @ 1.544 Mbps                                           ______________________________________                                         ##STR1##                                                                     ______________________________________                                    

The European standard primary digital multiplex signal (E1) differs fromthe U.S. standard in that it specifies a frame of 32 (decimal) codewords of eight bits each as shown in Table T-2. The first code word (orbyte) in each frame is used for framing information, the seventeenthcode word in the frame is used for signaling information for eachchannel, and the remainder of the code words (or bytes) contain encodedspeech or data. There are thus 30 data bytes, one framing byte, and onesignaling byte in each 32-byte frame. Since the frames must occur at thestandard 8,000 per second rate, the data rate is 256 bits in 125μSeconds or 2.048 Mbps.

                  TABLE T-2                                                       ______________________________________                                        Frame Structure for E1 @ 2.048 Mbps                                           ______________________________________                                         ##STR2##                                                                     ______________________________________                                    

Note that more than one T1 or E1 channel may be dedicated to a singlelogical channel. This technique is called "Superchannels" and isdiscussed in more depth in FIGS. 23-25.

The primary OSI model Link Level data communications protocol utilizedwith T1 and E1 is the "High-level Data Link Control" (HDLC) protocol.HDLC is a standard (ISO 4335, 3309) originally developed by theInternational Organization for Standardization (ISO). An almostidentical standard (ANSI X3.66) titled "Advanced Data CommunicationsControl Procedures" (ADCCP) was adopted by the American NationalStandards Institute (ANSI). With very minor exceptions, ADCCP has beenadopted by the U.S. National Bureau of Standards (FIPS PUB 71-1) for useon U.S. federal government procurements and by the FederalTelecommunications Standards Committee (FED-STD-1003A) as the standardfor national-defense related National Communications System. A subset ofHDLC titled "Link Access Procedure, Balanced" (LAP-B) was adopted by theInternational Telegraph and Telephone Consultative Committee (CCITT) aspart of its X.25 packet-switched network standard. Finally, numerousvendors have their own HDLC variants, including SDLC by IBM and UDLC byUnisys. The remainder of this specification will use the term HDLC toinclude HDLC and all of its variants and progeny.

HDLC is a "bit stuffing" protocol. The protocol uses a hex 06e flag toseparate blocks of data. The hex 06e flag includes six consecutive onebits. In order to guarantee identification of this flag, blocks of datacannot contain more than five consecutive one bits. This is accomplishedby automatically inserting a zero bit (termed "zero insertion") afterevery sequence of five one bits. At the opposite end of a transmission,zero bits following five consecutive one bits are removed (termed "zerodeletion").

Traditionally, high speed transmissions such as T1 and E1 channels havebeen multiplexed onto and demultiplexed off of their component TimeDivision Multiplexed (TDM) channels with stand-alone TDM multiplexers.Then each T1/E1 channel is framed/deframed by itself. There has been agrowing need for integrating T1/E1 TDM multiplexing/demultiplexing withHDLC framing/deframing and the processing of the encoded data.

Motorola, Inc., assignee of this application, recently introduced theMC68360 Quad Integrated Communications Controller (QUICC). It isdescribed in detail in the "MC68360 Quad Integrated CommunicationsController User's Manual", available as MC68360UM/AD from one ofassignee's Literature Distribution Center. One such center can bereached by mail to Motorola Literature Distribution, P.O. Box 20912,Arizona 85036, U.S.A.

The MC68360 QUICC controller is a versatile one-chip integratedmicroprocessor and peripheral combination that can be used in a varietyof controller applications. It was designed to particularly excel incommunications activities. A Time Slot Assignor is used to Multiplex andDemultiplex multiple channels on a single T1/D1 line. Up to four HDLCchannels can be framed/deframed at a time.

A successor to the MC68360 QUICC has been introduced by assigneeMotorola, Inc. as the MC68MH360 QUICC32. Reference material for thiscontroller is available through the Literature Distribution Centers as"MC68MH360RM/AD". The QUICC32 supports framing and deframing of up to 32channels operating at T1/E1 speeds. The MC68360UM/AD and MC68MH360RM/ADmanuals are incorporated herein by reference.

Hereinbelow, the terms "assert" and "negate" will be used when referringto the rendering of a signal, status bit, or similar apparatus into itslogically true or logically false state, respectively. If the logicallytrue state is a logic level one, the logically false state will be alogic level zero. And if the logically true state is a logic level zero,the logically false state will be a logic level one. The term "bus" willbe used to refer to a plurality of signals which may be used to transferone or more various types of information, such as data, addresses,control, or status. Finally, all numbers are displayed in hexadecimal("hex") unless indicated otherwise explicitly or through context.

FIG. 1 is a block diagram showing the main components of an IntegratedCommunications System 20. The Integrated Communications System 20contains a CPU core 22 connected to a Communications Processor Module(CPM) 24 via an Inter-Module Bus (IMB) 26. The CPU core 22 can bestandard processor. For example, the MC68360 utilizes a Motorola 68060core capable of executing the 68060 instruction set. More recently, aRISC based PowerPC CPU Core 22 has been introduced. The CPM 24communicates over T1 and E1 lines utilizing one or more communicationsLines 28.

Also attached to the Inter-Module Bus (IMB) 26 is an External BusInterface 30. It is used to connect to an External Bus 32. The ExternalBus 32 can be used to connect a plurality of Integrated CommunicationsSystems 20 together.

The Integrated Communications System 20 also includes DRAM Controllerand Chip Selects 34, Breakpoint logic 36, JTAG circuitry 38, SystemProtection 40, Periodic Timers 42, Clock Generation 44, and otherfeatures 46. One use of Clock Generation 44 is to provide thecommunications clock signals previously generated by a modem.

FIG. 2 is a block diagram showing the major components in animplementation of a Communications Processor Module (CPM) 24. Itsoperation is controlled by an embedded RISC Controller 50. The RISCController 50 includes internal timers 52. It is connected via aPeripheral Bus 54 to four full-duplex Serial Communication Controllers(SCCs), SCC1 60, SCC2 62, SCC3 64 SCC4 66, two Serial ManagementControllers (SMCs), SMC1 68, SMC2 70, and one Serial PeripheralInterface (SPI) 72. All are connected to a Serial Interface (SI) unit 74that includes a Time Slot Assignor (TSA) 76. The CPM 24 communicates viacommunications fines 28 connected to the TSA 76 and SI 74. Alsoconnected to the Peripheral Bus 54 is a Parallel Interface Port (PIP)78.

The CPM 24 has four SCCs 60, 62, 64, 66 that can be configuredindependently to implement different protocols. Together, they can beused to implement bridging functions, routers, gateways, and interfacewith a wide variety of standard and proprietary networks and protocols.The SCCs do not include the physical interface, but rather the logicwhich formats and manipulates the data obtained from the physicalinterface.

The CPM 24 has two Serial Management Controllers (SMC) 68, 70. They arefull-duplex ports that can be independently configured to support any of(currently) three protocols: UART, transparent, and GCI. In mostsituations, SMCs 68, 70 operate similarly to SCCs 60, 62, 64, 66, butwith reduced functionality. They are perfect for such applications asproviding a UART debug/monitor port to the Integrated CommunicationsSystem 20.

The Serial Peripheral Interface (SPI) 72 allows the IntegratedCommunications System 20 to exchange data with other QUICC chips, theMotorola MC68302, M68HC11, and M68HC05 microprocessor families, and anumber of peripheral devices, such as EEPROMs, real-time clocks devices,A/D converters, and ISDN devices. It is a full-duplex, synchronous,character-oriented channel that supports a four wire interface.

The Peripheral Interface Port (PIP) 78 allows the CPM to transfer datain and out over 8 or 16 parallel data bins. The pins of the PIP 78 aremultiplexed with the 18 bit B parallel I/O port. The PIP 78 supports theCentronics interface and a fast parallel connection with other similarIntegrated Communications Systems 20.

The Serial Interface (SI) 74 with Time Slot Assignor (TSA) 76 connectsthe physical layer serial lines to the four SCCs 60, 62, 64, 66 and twoSMCs 68, 70. In its simplest configuration, the SI 74 allows the fourSCCs 60, 62, 64, 66 and two SMCs 68, 70 to be connected with their ownset of individual pins. However, the main feature of the SI 74 is theTSA 76. The TSA 76 allows any combination of SCCs and SMCs to multiplextheir data together on either one or two TDM channels. TDM is used hereas a generic term that describes any serial channel that is divided intochannels separated by time, such as T1 lines in the U.S. and Japan, andCEPT lines in Europe.

The CPM 24 also includes a Parallel I/O controller 80, a Baud RateGenerator 82, Dual Ported RAM 84, an Interrupt Controller 86, and fourTimers 88. The RISC Controller 50 is also connected to up to twoIndependent Direct Memory Access (IDMA) 90 channels and up to fourteenSerial Direct Memory Access (SDMA) 92 channels.

The fourteen SDMA 92 channels are permanently assigned to the four SCCs60, 62, 64, 66, two SMCs 68, 70 and single SPI 72. Each channel ispermanently assigned to service either the receive or transmit operationof an SCC, SMC, or SPI. The two IDMA channels 90 are more generalpurpose, allowing Direct Memory transfer of data between any combinationof memory and I/O.

FIG. 3 is a block diagram showing the main components of animplementation of a CPM RISC Controller 50. It contains amicrocontroller 100 that includes a Scheduler 102. The microcontroller100 is connected via an Internal Bus 104 to an Execution Unit 106,Interrupt Logic 108, a Random Number Generator 110, and a HDLC Framer112. The CPM RISC Controller 50 also includes a Configuration andDevelopment Support module 114. The microcontroller 100 and Scheduler102 communicate with the I/O modules of the CPM 24 over a peripheral Bus54.

FIG. 4 is a block diagram showing the major components of the HDLCFramer module 112 shown in FIG. 3. HDLC framing encodes raw data intoHDLC format for transmission and decodes HDLC encoded receptions intoraw data.

Data is transmitted or received from/to a SCC 60, 62, 64, 66 (FIG. 2) intransparent mode usually eight bits at a time. Each eight bitstransmitted or received corresponds with a T1/E1 TDM timeslot. Thus,eight bits are transmitted or received for Time Slot 1, then eight bitsfor Time Slot 2 (see FIG. 23), etc. This cycle is repeated for each ofthe bytes received, each such byte received corresponding an eight bittime slot in a TDM frame.

The CPM Controller 20 deframes HDLC on a TDM line by receiving an eightbit byte as serial input. The CPM Controller then loads zero-deletionstate (ZDSTATE) for the corresponding channel along with a mask (MASK)and the input byte into registers. The Framer 112 is then activated,which deletes the bit stuffed zeros (Zero Deletion) and recognizes HDLCflags. State (ZDSTATE) is then (re)saved in the corresponding channeltable and if a byte of data has been deframed, it is stored in anReceive (Rx) buffer. This is then repeated for the next byte received asserial input, utilizing the channel table corresponding to the nexttimeslot.

HDLC framing is very similar. If output is available for a givenchannel, mask (MASK), zero-insertion state (ZISTATE) and possibly anoutput data byte are loaded from tables associated with the channel intospecial registers. The Framer 112 is then activated. It performs maskingand zero-insertion. When the Framer 112 completes, after eight bits ofoutput data have been generated, the CPM Controller 20 stores thezero-insertion state (ZISTATE) in the corresponding channel table, andthe byte returned is transmitted serially over a communications line 28utilizing a SSC 60, 62, 64, 66 and the Serial Interface 74. This isrepeated for the channel corresponding to the next TDM timeslot.

The HDLC Framer 112 has a register containing Input Data 120, a Maskregister 122, a Data Out and Status register 124, Receive (Rx) state126, and Transmit (Tx) state 128.

FIG. 4 also shows the input and out-put signals received and generatedby the HDLC Framer 112. These are listed along with the correspondingreference numbers ("Ref" column) in Table T-3. The HDLC Framer 112 isdriven by two clocks, Φ1 and Φ2. The clock in which the various signalsare active or valid is listed in the "Tim" column.

                  TABLE T-3                                                       ______________________________________                                        Framer Signals                                                                Signal(s)                                                                            Description             Tim    Ref                                     ______________________________________                                        dscra  General Register Output Bus (Main register)                                                           Φ1 136                                     dscrb  General Register Output Bus (Other registers)                                                         Φ1 138                                     mdest  General Register Input Bus                                                                            Φ2 140                                     ubit   Contains OPcode being executed                                                                        Φ1 142                                     mdmawra                                                                              DMA space regs address for dscrb bus                                                                  Φ1 144                                     mdmarda                                                                              DMS space regs address to dscra bus or mdest                                                          Φ1 146                                            bus                                                                    mser   Bus supplying serial input to Framer                                                                  Φ1 148                                     mewait Wait, main has stopped execution                                                                      Φ1 149                                     mreset Main's reset signal     Φ2 150                                     mphi1  Clock Φ1 asserted   Φ1 151                                     mhpi2  Clock Φ2 asserted   Φ2 152                                     mdmaw  DMA regs space write    Φ1 154                                     mdmar1 Read DMA into srca      Φ1 156                                     mdmar2 Read DAM into srcb      Φ1 158                                     ______________________________________                                    

FIG. 5 shows the CPM register sets. There are four main register setsused: a general register set 160, a Special Function register set 162, aProgram Status register set 164, and a Dedicated register set. TheDedicated register set contains a plurality of overlapping register setsdedicated to various functions. Some of the Dedicated register sets arethe Special Register set 166, IDMA1 register set 168, IDMA2 register set170, and SDMA register set 172. The Framer 112 interacts with the SERregister 174 in the Special Function Registers 162, and SR2 176 and SR3178 in the Special Register Set 166.

Both the Transmit (Tx) and Receive (Rx) Framer 112 functions utilize thesame set of registers to save silicon space. Table T-4 shows theinformation in each of the special registers before and after the Frameris invoked.

                  TABLE T-4                                                       ______________________________________                                        Framer Registers                                                              I/O     Time     SER (174) SR2 (176)                                                                             SR3 (178)                                  ______________________________________                                        Rx      Before   Data      Mask    ZDSTATE                                    Rx      After              Data Out                                                                              ZDSTATE                                    Tx      Before   Data      Mask    ZISTATE                                    Tx      After              Data Out                                                                              ZISTATE                                    ______________________________________                                    

The SER register 174 is used to initialize the SERIN register 300 (FIG.9), 400 (FIG. 14). It contains the eight bits of data to be operatedupon by the Framer 112. The Framer 112 zero-inserts into this data forinput (Rx) and zero-deletes for output (Tx).

The contents of the 32 bit Data Out Register in the SR2 register 176 isshown in Table T-5.

                  TABLE T-5                                                       ______________________________________                                        DATA OUT Register                                                             7       6       5       4    3     2    1     0                               ______________________________________                                        0    DATAO (Data Out)                                                         1    Valid  In      No    Abort                                                                              Idle  Idle Linf  Err                                Data   Frame   Octet      Stat  Delta                                    2    --     --      Mask (7:6)                                                                             --    --   --    --                              3    --     --      Mask (5:0)                                                ______________________________________                                    

Table T-6 contains a description of the Data Out Register fields:

                  TABLE T-6                                                       ______________________________________                                        Field Name                                                                            Description                                                           ______________________________________                                        DATAO   Rx: FIFO to retain output data                                                Tx: accumulates processed bit stream                                  Valid Data                                                                            Rx: Data Out (DATAO) valid because of Zero deletion or                        masked bits                                                           In Frame                                                                              Rx: machine is inframe                                                No Octet                                                                              Rx: Frame ended with non octet data.                                  Abort   Frame ended by an abort                                               Idle Stat                                                                             Rx: Idles detected in input stream                                    Idle Delta                                                                            Rx: Idle Stat changed                                                 Linf    Rx: Asserted at inframe or no octet                                   Err     Rx: No Octet or Abort                                                 Mask    Mask bits                                                             ______________________________________                                    

The DATAO 336 (FIG. 9), 422 (FIG. 14) byte contains the primary outputof the Framer 112. The transmit function (Tx) does masking and zeroinsertion. In that case, DATAO will always contain an output byte.However, the receive function (Rx) does masking and zero deletion. Inthat case, not every activation of the Framer for input generates a bytein DATAO. The "Valid Data" flag is used to indicate whether DATAOcontains a valid input byte.

The Mask 332 (FIG. 9), 412 (FIG. 14) is an 8 bit register used to ignoreinput bits or output bits. The noncontiguous format in the Data Outregister matches the Mask bits in the Time Slot Assignment (TSA) tableshown hereinbelow. Note that all of the fields in the Data Out registerexcept for the Mask are output from the Framer. Thus, of the Data Outflags, only the Mask needs to be loaded into SR2 176 before activatingthe Framer 112.

The remainder of the Data Out register contains output status flagsgenerated from operation of the Framer 112. As noted above, the "ValidData" flag indicates whether or not DATAO contains valid input dataafter zero-deletion. The "In-Frame" flag identifies whether the Txmachine is inframe (see FIG. 10). The "No Octet" flag is used toindicate that an input HDLC frame did not result in an even multiple ofeight bits after zero-deletion. The "Abort" flag indicates that an Abortflag sequence was detected. The "Idle Star" flag indicates whether anIdle was detected in the input stream. The "Idle Delta" flag indicatesthat the "Idle Stat" flag changed from the previous activation of theFramer. The "Linf" and "Err" flags indicate error conditions.

When the Framer 112 is activated, register SR3 178 contains the STATE ofthe zero-insertion (ZISTATE) machine or zero-deletion (ZDSTATE) statefor the channel corresponding to the timeslot. The format of the 32 bitSTATE Register is shown in Table T-7.

                  TABLE T-7                                                       ______________________________________                                        STATE Register                                                                1f    18 17   10     0f    08    07    00                                     ______________________________________                                        STATUS   PRE         POST        DATA                                         ______________________________________                                        |     |                                                     V     V                                                                       ______________________________________                                        STATUS                                                                        1f    1e     1d      1c    1b    1a    19    18                               ______________________________________                                        NW    Tm     Nm      Drp   Rm    Idle  INF   Dful                             ______________________________________                                    

Table T-8 contains the descriptions of the fields in the 32 bit STATUSregister shown in Table T-7. The PRE 310 (FIG. 9), 402 (FIG. 14), POST320 (FIG. 14), 408 (FIG. 14), and DATA 330 (FIG. 9), 420 (FIG. 14)fields are treated as individual registers in the Zero-Deletion machine(FIG. 9) and the Zero-Insertion Machine (FIG. 14).

                  TABLE T-8                                                       ______________________________________                                        STATUS Register Field Descriptions                                            Field Name  Description                                                       ______________________________________                                        PRE         Rx: used to detect pre-delimiter conditions                                   Tx: input FIFO for incoming data                                  POST        Rx: used to detect post-delimiter conditions                                  Tx: loaded in ∥ with data from PRE                       DATA        Rx: accumulate processed data                                                 Tx: used to detect 5 consecutive "1" bits                         STATUS      See below:                                                        NW          0 = Tx needs new input data                                       Tm          Current Tx data under process mode:                                           0 = HDLC zero insertion                                                       1 = as is                                                         Nm          New Tx data will be treated:                                                  0 = HDLC zero insertion                                                       1 = as is                                                         Drp         At transparent Rx: drop first data valid                          RM          Current Rx data under process mode:                                           0 = HDLC zero insertion                                                       1 = as is                                                         Idle        Current idle state of framer:                                                 1 = idle                                                          INF         Rx machine in/out frame indication:                                           0 = outframe                                                                  1 = inframe                                                       Dful        Rx Data register is full                                          ______________________________________                                    

The Framer 112 is invoked utilizing a new instruction. The form of theinstruction is:

    frame{.t|.r}[.zid|.nzid]

The "t" indicates transmit (Tx) mode, the "r" indicates receive (Rx)mode, the "zid" indicates zero-insertion mode, and the "nzid" indicatesno zero insert/delete. Note that the "zid" and "nzid" modes are onlynecessary when changing modes on a channel.

An example sequence for invoking the Framer 112 to process eight bits ofinput data corresponding to one T1/E1 code word/timeslot:

    ______________________________________                                               1d.h        sr2,Mask                                                          1d.1        sr3,ZDSTATE                                                       1d.b        ser,input.sub.-- data                                             frame.r                                                                       nop                                                                           nop                                                                           nop                                                                           nop                                                                           nop                                                                           nop                                                                           nop                                                                           st.1        sr2,RSTATE                                                        st.1        sr3,ZDSTATE                                                ______________________________________                                    

The ".l" extension to the load and store instruction indicates full word(32 bit), the ".h" indicates half word (16 bit), and the ".b" indicatesbyte (8 bit) operation.

Note that the seven NOPs are for timing. Each Framer 112 activationconsumes up to eight full clock cycles. Each of the full clock cycleshas the Φ1 clock signal asserted followed by the Φ2 clock signal. Datais shifted in the Φ1 clock cycle, and tested in the Φ2 clock cycle. Thisis illustrated in FIG. 6. ZDSTATE and RSTATE are located in the ChannelTables (Table T-18). The Mask is retrieved from the Time Slot AssignmentTable (TSA) (Table T-16).

FIG. 7 is a flow chaff showing invocation of the Framer 112 Receiver(Rx) function. A loop is entered starting with step 502. A check is madefor more data in the input FIFO 56 (see FIG. 21), step 502. If no moredata is present in the input FIFO 56, the loop is exited, step 504.Otherwise, the next logical channel is identified and its correspondingchannel table is located, step 506. The HDLC Zero Deletion State(ZDSTATE) is loaded from the channel table, step 508, the mask is loadedinto the MASK register (not shown), the next code word is loaded fromthe input FIFO 56 into the SERIN register, step 510, and the Framer 112is invoked to Deframe the input data, step 512. After the Framer 112completes operation, the HDLC Zero Deletion State (ZDSTATE) is storedback into the channel table, step 514. At this point, a check is madewhether a deframed byte has been returned in register DATAO from theFramer 112, step 514. This is done by checking the Valid Data flag (seeTable T-5) returned in the DATA Out register. If a byte has beenreturned in DATAO, step 514, it is stored as the next input byte in thechannel input buffer, step 518. In any case, the loop is repeated untilno more data is found in the input FIFO 56.

FIG. 8 is a flow chart showing invocation of the Framer 112 Transmitter(Tx) function. A loop is entered starting with step 522. If there is nomore room in the output FIFO 58 (see FIG. 21), the loop is exited, step524. Otherwise, the next logical channel is identified and itscorresponding channel table is located, step 526. The HDLC ZeroInsertion State (ZISTATE) is loaded from the channel table, step 528,and the mask is loaded into the MASK register (not shown). A check ismade whether more HDLC data is required by the Zero Insertion Machine,step 530. This is done by testing the NW Zero Insertion State (ZISTATE)flag (see Table T-8). If output data is required, step 530, it is loadedfrom the channel output buffer into the SERIN register, step 532. In anycase, the Framer 112 is invoked to Frame the output data, step 534.After the Framer 112 completes operation, the HDLC Zero Insertion State(ZISTATE) is stored back into the channel table, step 536, the framedcode word is stored from the DATAO register as the next entry in theoutput FIFO buffer 58, step 538, and the loop is repeated until no moreroom is found in the FIFO 58.

Note that the operation of the RISC Controller 50 alternates between theReceive (Rx) loop shown in FIG. 7 and the Transmit (Tx) loop shown inFIG. 8, keeping the input FIFO 56 empty and the output FIFO 58 full.Other operations by the RISC Controller 50 can be intermixed as long asthe output FIFO 58 is not allowed to become empty (underflow) and theinput FIFO 56 is not allowed to become full (overflow).

The Framer 112 is further described in FIGS. 9-17. FIGS. 9-13 describethe Receiver (Rx) function, and FIGS. 14-17 describe the Transmitter(Tx) function.

FIG. 9 is a block diagram showing the major components of the Receiver(Rx) function. As shown above, eight bits of data to be processed areloaded in the SER register 174. This is copied into the SERIN register300. At each major clock cycle, one bit is shifted out of the SERINregister 300, and is replaced with a zero bit 304. The bit shifted outof SERIN 300 is conditionally shifted into the PRE register 310. Theconditional shifting is controlled by a Mask Transfer Circuit 306. TheMASK register 302 is right shifted along side of the SERIN register 300.If a one ("1") bit is shifted out of the MASK register 302, thecorresponding bit shifted out of the SERIN register 300 is shifted intothe PRE register 310. Otherwise, the SERIN 300 bit is ignored.

Table T-9 shows the operation shifting bits out of SERIN 300 into PRE310. Note that the MASK here is assumed to contain all one (`1`) bits.Also note that in the example shown, instead of counting eight majorclock cycles, the Framer 112 is stopped when a pattern of binary`00000001` has been shifted into SERIN 300.

                  TABLE T-9                                                       ______________________________________                                        Rx: SERIN => PRE                                                                                                           To                               8    7     6      5   4    3   2    1   0    PRE  Status                      ______________________________________                                        1    a7    a6     a5  a4   a3  a2   a1  a0        at start                    0    1     a7     a6  a5   a4  a3   a2  a1   a0   first shift                 0    0     1      a7  a6   a5  a4   a3  a2   a1                               0    0     0      1   a7   a6  a5   a4  a3   a2                               0    0     0      0   1    a7  a6   a5  a4   a3                               0    0     0      0   0    1   a7   a6  a5   a4                               0    0     0      0   0    0   1    a7  a6   a5                               0    0     0      0   0    0   0    1   a7   a6   detect stop                 0    0     0      0   0    0   0    0   1    a7   stop                        1    b7    b6     b5  b4   b3  b2   b1  b0        at start                    0    1     b7     b6  b5   b4  b3   b2  b1   b0   first shift                 0    0     1      b7  b6   b5  b4   b3  b2   b1                               0    0     0      1   b7   b6  b5   b4  b3   b2                               ______________________________________                                    

Table T-10 illustrates the operation transferring bits from SERIN to PRE310 when the MASK 302 contains some zero bits.

                  TABLE T-10                                                      ______________________________________                                        Rx: SERIN => PRE with Mask                                                                                                        To                        8    7      6      5   4    3   2    1   0    Mask  PRE                       ______________________________________                                        1    a7     a6     a5  a4   a3  a2   a1  a0                                   0    1      a7     a6  a5   a4  a3   a2  a1   1     a0                        0    0      1      a7  a6   a5  a4   a3  a2   1     a1                        0    0      0      1   a7   a6  a5   a4  a3   0     --                        0    0      0      0   1    a7  a6   a5  a4   0     --                        0    0      0      0   0    1   a7   a6  a5   1     a4                        0    0      0      0   0    0   1    a7  a6   1     a5                        0    0      0      0   0    0   0    1   a7   0     --                        0    0      0      0   0    0   0    0   1    0     --                        1    b7     b6     b5  b4   b3  b2   b1  b0                                   0    1      b7     b6  b5   b4  b3   b2  b1   1     b0                        0    0      1      b7  b6   b5  b4   b3  b2   1     b1                        0    0      0      1   b7   b6  b5   b4  b3   0     --                        ______________________________________                                    

In the example above, after two complete Framer 112 activation, the PREregister 310 contains: b5,b4,b2,b1,a5,a4,a2,a1.

As bits are shifted into the left side of the PRE register 310, they areshifted out the right side into the POST register 320. Also, during eachmajor clock cycle, the eight bits in the PRE register 310 are tested byPRE detection circuitry 308. The primary purpose of the PRE detectioncircuitry 308 is to identify flags. In a similar way, POST detectioncircuitry 322 tests the eight bits in the POST register 322 to identifyflags. The flags tested in the PRE detection circuitry 308 and POSTdetection circuitry 322 are shown in Table T-11. Note that the "x"entries in the table indicate a "don't care" situation.

                  TABLE T-11                                                      ______________________________________                                        PRE & POST Delimiters                                                         at PRE     at POST      STATUS    Description                                 ______________________________________                                        1 1 1 1 1 1 1 1                                                                          1 1 1 1 1 1 1 x                                                                            IDLE      Idle                                        x x x x x x x x                                                                          0 1 1 1 1 1 1 0                                                                            OFLAG     Open flag                                   x 1 1 1 1 1 1 1                                                                          x x x x x x x x                                                                            SFLAG     Shared Flag                                 0 1 1 1 1 1 1 0                                                                          x x x x x x x x                                                                            CFLAG     Close flag                                  x 1 1 1 1 1 1 1                                                                          x x x x x x x x                                                                            ABORT     Abort                                       1 1 1 1 1 1 1 x                                                                          x x x x x x x x                                                                            ABORT     Abort                                       x x x x x x x x                                                                          1 1 1 1 1 x x x                                                                            FONES     Zero Delete                                 ______________________________________                                    

Of special interest is the FONES (5 Ones) status and the OFLAG (OpeningFlag) status. Inframe status 341 (FIG. 10) is not entered until OFLAG isdetected in the POST detection circuitry 232. At this point, the nextbit to be shifted out of the PRE register 310 is the first data bit in aframe. Five one bits (FONES) recognized by the POST detection circuitry232 are used for zero insertion and deletion.

The five delimiters detected in the PRE detection circuitry 308 (IDLE,SFLAG, CFLAG, and two ABORTs) are the five signals 318 from the PREdetection circuitry to the Main Transfer Control Circuit 312. Likewise,the three delimiters detected in the POST detection circuitry 322 (IDLE,OFLAG, and FONES) are the three control signals 324 from the POSTdetection circuitry to the Main Transfer Control Circuit 312. The othercontrol signals to the Main Transfer Control Circuit 312 are four of theRx bits in the zero insertion state (ZISTATE) shown in Table T-7 (Drp,RM, Idle, Inf) plus a separate Transparent signal 316. This lattersignal 316 is generated from the instruction OP code (see above) and ismerged with the "RM" STATE signal.

The Rx Main Transfer Control Circuit 312 determines whether or not thebits shifted out of the PRE register 310 are shifted into the DATAregister 330. The general function of the Circuit 312 is that the PRE310 is shifted into the DATA register 330 if the Zero-Deletion machineis either in transparent mode, or is Inframe and not zero-deleting.Determination whether the machine is Inframe is according to the statediagram in FIG. 10. Zero deletion is triggered when Inframe and fiveones are detected (FONES) by the POST detection circuit 322.

The Rx Main Transfer Control Circuit 312 implements the FIG. 10 statemachine. The location of the zero-deletion machine in this state machineis maintained by the same four STATE signals (Drp, RM, Idle, Inf). TheseSTATUS flags are generated as signals 328 for ultimate storage back inthe SR3 register 178. Also generated as signals are the eight Data Outstatus flags 326 (see Table T-5).

Bits are shifted from the PRE register 310 through the Main TransferControl Circuit 312 into the DATA register 330. When the DATA FullDetect Circuit 332 detects that eight bits have been shifted into the.DATA register 330, the eight bits are gated to the DATAO register 336.The DATA register is then reinitialized with to be binary "1000000". The"Dful" signal follows the Data Full status. This in turn is assertedwhenever the one bit is shifted out of the DATA register 330. Table T-12shows the operation of the shifting and gating.

                  TABLE T-12                                                      ______________________________________                                        Rx: PRE => DATA => DATAO                                                      PRE                       D                                                   [0]  DATA[7:0]            F     Datao Status                                  ______________________________________                                        a7   a6     a5    a4  a3  a2  a1  a0  1   0   XXXX                            b0   a7     a6    a5  a4  a3  a2  a1  a0  1   XXXX  data full                 b1   b0     1     0   0   0   0   0   0   0   A[7:0]                                                                              load datao                b2   b1     b0    1   0   0   0   0   0   0   A[7:0]                          b3   b2     b1    b0  1   0   0   0   0   0   A[7:0]                          b4   b3     b2    b1  b0  1   0   0   0   0   A[7:0]                          b5   b4     b3    b2  b1  b0  1   0   0   0   A[7:0]                          b6   b5     b4    b3  b2  b1  b0  1   0   0   A[7:0]                          b7   b6     b5    b4  b3  b2  b1  b0  1   0   A[7:0]                          c0   b7     b6    b5  b4  b3  b2  b1  b0  1   A[7:0]                                                                              data full                 c1   c0     1     0   0   0   0   0   0   0   B[7:0]                                                                              load datao                c2   c1     c0    1   0   0   0   0   0   0   B[7:0]                          c3   c2     c1    c0  I   0   0   0   0   0   B[7:0]                          ______________________________________                                    

The current status of the Dful flag 334 is combined with the other fourRx STATE flags 328 to maintain the state of the Zero-Deletion Deframingmachine. The signals will ultimately propagate back to the STATUSreturned after Framer 112 activation in reg. SR3 178 (FIG. 5).

Returned in the upper half of register SR2 176 (FIG. 5) are the Data OutStatus 326 (Table T-5) and the contents of the DATAO register 336 (TableT-5). The sixteen bits returned are placed on the General Register Bus338 by asserting the appropriate DSRCB signals 138 (FIG. 4).

FIG. 10 is a state diagram showing the primary states and statetransitions of the Zero-Deletion machine. The state machine isinitialized in HUNT state 340. A Start₋₋ Data event will transition 344to Inframe state 341. The machine stays in Inframe state 341 whileeither normal₋₋ data is encountered, or it is zero-deleting. Whenneither normal₋₋ data nor zero₋₋ delete substates are active, themachine will transition 348 back to HUNT state 340. The relevantvariables are defined below. Their primary source are the delimiterstatus signals generated by the PRE Detection Circuit 308 and POSTDetection Circuit (Table T-11).

start₋₋ data=(˜inframe&ofiag&˜cflag&˜sfiag&˜abort).vertline.trans

normal₋₋ data=(inframe & ˜cflag & ˜sfiag & ˜abort) | trans

zero₋₋ delete=inflame & fones & ˜trans

inflame=start₋₋ data |normal₋₋ data | zero₋₋ delete

The flags and fields in the above equations are further defined in TableT-13:

                  TABLE T-13                                                      ______________________________________                                        Zero-Deletion Machine Signals                                                 signal/status  Description                                                    ______________________________________                                        start.sub.-- data                                                                            state signal - see above                                       normal.sub.-- data                                                                           state signal - see above                                       zero.sub.-- delete                                                                           state signal - see above                                       inframe        state signal - see above                                       oflag          OFLAG (Table T-11) Open Flag                                   cflag          CFLAG (Table T-11) Close Flag                                  sflag          SFLAG (Table T-11) Shared Flag                                 abort          ABORT (Table T-11) Abort                                       fones          FONES (Table T-11) Five Ones                                   trans          Transparent mode                                               ______________________________________                                    

FIGS. 11-13 are flow charts showing a virtual implementation of theDeframer. The flow charts are included to show the interrelationshipsbetween and among the various components in FIG. 10.

FIG. 11 is a flowchart showing a virtual implementation of the highlevel logic in the Deframer. The Deframer is activated, step 350, byexecution of the "frame.r" command. The Deframing is initialized, step352. This comprises moving the SER register 174 (FIG. 5) into the SERINregister 300, and initializing a loop. The loop from step 354 to step362 is executed eight times--one time for each bit in SERIN 300.

One implementation for controlling the loop is through usage of acounter. However, circuitry can be reduced by only loading the leftmostseven bits of SER 174 into the rightmost seven bits of SERIN 300,initializing the leftmost bit of SERIN 300 to zero, and treating theremaining bit of SER 174 as if it had been shifted out of SERIN 300.Then, whenever a bit is shifted out of SERIN 300, a zero bit is shiftedin on the other end. The looping is terminated, halting the Framer 112,when SERIN 300 contains binary `00000001`. This indicates that all ofthe bits from SER 174 have been shifted out of SERIN 300. Thisprogression is shown in Table T-9.

The loop is entered by first checking whether there are more bits toprocess, step 354. If this is done by checking for `00000001` in SERIN300 as described above, the test is efficiently performed in circuitryusing an eight input NAND gate that has one input bit inverted. If thereare no more bits to process, step 354, the Deframer is exited, step 355.At this point, the Data Out bits are sent to SR2 176 and the fiveupdated Rx Status bits 328 along the three Tx status bits, PRE 310, POST320, and DATA 330 registers to the SR3 register 178.

Otherwise, one bit (the "SERIN" bit) is shifted from SERIN 300, step356. A bit (the "MASK" bit) is simultaneously shifted from the MASKregister 302, step 358. If the MASK bit is set, step 360, the SERIN bitis shifted into the PRE register 310, step 362 (see FIG. 12). In eithercase, the loop starting at step 354 is repeated.

FIG. 12 is a flow chart showing the virtual operation of the Shiftingthe SERIN bit into the PRE register 310, which is step 362 in FIG. 11.First, the SERIN bit is shifted in the PRE register 310. The bit (the"PRE bit") shifted out of the PRE register 310 is shifted into the POSTregister 320, step 364. Then the PRE register 310 and the POST register320 are compared for matching with various delimiters, step 366. This isthe functionality implemented in the PRE Detection Circuit 308 (FIG. 9)and the POST Detection Circuit 322 (FIG. 9). The definitions of thedelimiters checked are shown in Table T-11. Note that "x" entries are"don't cares" and that more than one test may succeed, resulting in theassertion of more than one signal.

First, a check is made for an IDLE, step 368. If an IDLE was found, anIDLE signal is asserted, step 369. Next, a check is made for an OpenFlag in POST 320, step 370. If found, the OPEN is processed, step 317,resulting in the assertion of an "OPEN" signal. A check is then made fora Shared Flag (SFLAG), step 372. If found, the SFLAG is processed, step372, resulting in the assertion of a SFLAG signal, step 373.

A check is made for Closing Flags (CFLAG), step 374. If the CFLAGpattern is found, step 374, it is processed, step 375, resulting in anassertion of the CFLAG signal. A check is made for an Abort flag(ABORT), step 376. If the ABORT pattern is identified, it is processed,step 377, resulting in an assertion of an ABORT flag. Finally, a checkis made for five ones (FONES) in the POST register 320, step 378. If thefive one bits are detected, step 378, the FONES pattern is processed,step 379, resulting in an assertion of a FONES signal.

Checks are then made whether in Transparent mode, step 380, whetherInframe, step 382, and whether in Zero Delete state, step 384. ZeroDelete state is entered when five ones are detected in the POST register320, step 379, followed by a zero bit sifted out of PRE 310. If intransparent mode, step 380, or in Inframe Mode, step 382, and not inZero Delete mode, step 384, the PRE bit is shifted into DATAO, step 386(see FIG. 13 for more detail). In any case, the Shift SERIN bit into PREfunction is exited, step 388, iterating back to step 354 in FIG. 11.

FIG. 13 is a flow chart showing more detail for the Shift SERIN bit intoPRE function, step 362 in FIG. 12. A check is made whether the Dful flagis set, step 390. If not set, steps 392 through 396 are skipped.Otherwise, the DATAO register 336 is loaded from the DATA register 330,step 392. The DATA register 330 is loaded with binary `10000000`, step394, and an Input Valid status is latched as a one, status 396.

In any case, the PRE bit is shifted into the DATA register 330, and thebit shifted out of the DATA register 300 is placed in Dful, step 398,and the function exits, 399, returning back to FIG. 12.

A closer examination of the interaction between the DATA register 330and the Dful flag may be in order. It can be seen that the purpose ofinitializing DATA 330 with `10000000` is so that the first seven timesthat a bit is shifted out of DATA 330 and into Dful, it will be a zerobit. On the eight shift, the one bit is shifted into Dful, indicatingthat the DATA register 330 contains eight valid data bits. Thisprogression can be followed in Table T-12.

The order of the steps shown in FIGS. 11-13 were shown for clarity. Itis expected that other orderings may result in more efficient execution.For example, in FIG. 13 instead of loading DATA 330 with `1000000`, step394, then shifting one of these bits into Dful, step 398, Dful can beset to zero, and DATA set to `x1000000` where the `x` bit is the PREbit.

FIG. 14-17 shown the operation of the Framing Transmit (Tx)functionality. FIG. 14 is a circuit block diagram showing the primaryblocks utilized in the preferred implementation of the Tx functionality.

In the Framer Receive (Rx) implementation discussed above, the Framerwas input driven--the Framer 112 processes exactly eight input bits,generating between zero and eight output bits. Zero deletion, framing,and masking all contribute to the reduction in output bits compared withinput bits. But since output has to be in multiples of the byte size(8), some Framer 112 activations do not result in output.

This relationship is reversed in the Framer Transmit (Tx)implementation--the Framer 112 generates exactly eight output bits everytime it is activated. These eight output bits are generated from zero toeight input bits. This increase in the number of bits generated from thenumber of input bits is a primarily a result of zero insertion. As thenumber of input bits for each activation must be a multiple of the bytesize (8), not every activation of the Framer 112 requires an input byte.

The other ramification of this is that the Framer Tx functionality isoutput driven. For that reason, the circuit will be discussed from theoutput side back to the input side, instead of the other way around aswas done for the Rx portion of the Framer 112 functionality.

Eight bits are shifted through the Select Circuit 406 into the DATA 420and DATAO 422 registers. The DATAO register 422 contains the Framer 112output returned in register SR2 176. The DATA register 420 maintains ahistory of bits shifted out through the Select Circuit 406 acrossdifferent iterations and Framer 112 activations. One reason to maintainthis history is to identify five one bits (FONES) in a row 416. Thissignal is one of the input signals to the Select Circuit 406, directingthe Select Circuit 406 to supply a zero for zero insertion as the nextbit shifted into DATA 420 and DATAO 422, unless in transparent mode.

Terminating the Framer Tx function is done when eight bits have beenshifted into DATA 420 and DATAO 422. One implementation is to utilize acounter. The preferred implementation due to the amount of circuitryrequired is to initialize DATAO 422 to binary `10000000` when the Framer112 is activated. Then each bit of DATAO 422 is checked as it is shiftedout and a bit is shifted in from the Select Circuit 406. When the `one`bit is shifted out of DATAO 422, eight bits have been shifted in, andthe Framer 112 terminates. Note also that during initialization, if the"NW" flag is set, the PRE register 402 is initially loaded with theeight bits in the SERIN register 400.

The Select Circuit 406 can be viewed as having four control inputs:FONES detect 424, Transparent mode 414, a MASK bit 412, and the POSTregister empty circuit 410, and four data inputs: a bit shifted out ofthe PRE register 402, a bit shifted out of the POST register 408, aconstant `1`, and a constant `0`.

As noted above, if not in transparent mode (i.e. the Transparent signal414 is not asserted), and FONES (5 ones) are detected 416, a zero isoutput from the Select Circuit. In any case, a bit is shifted out of theMASK register 412. If the MASK register 412 bit is not set, a constantone (`1`) bit is output from the Select circuit 406. Otherwise, a bit iseither shifted out of PRE 402 or POST 408 depending on the statusasserted by the POST empty detect circuit 410.

Table T-14 shows the operation of shifting bits out of the POST register408 at the direction of the Select Circuit 406 and into the DATAOregister 422.

                  TABLE T-14                                                      ______________________________________                                        Tx: POST => DATAO                                                                                                     To                                    7    6     5      4   3    2   1    0   datao Status                          ______________________________________                                        0    0     0      0   0    0   1    e7  e6                                    0    0     0      0   0    0   0    1   e7    empty.sub.-- post               1    d7    d6     d5  d4   d3  d2   d1  d0    load.sub.-- post                0    1     d7     d6  d5   d4  d3   d2  d1                                    0    0     1      d7  d6   d5  d4   d3  d2                                    0    0     0      1   d7   d6  d5   d4  d3                                    0    0     0      0   1    d7  d6   d5  d4                                    0    0     0      0   0    1   d7   d6  d5                                    0    0     0      0   0    0   1    d7  d6                                    0    0     0      0   0    0   0    1   d7    empty.sub.-- post               1    c7    c6     c5  c4   c3  c2   c1  c0    load.sub.-- post                0    1     c7     c6  c5   c4  c3   c2  c1                                    0    0     1      c7  c6   c5  c4   c3  c2                                    ______________________________________                                    

When a binary `00000001` is detected in the POST register 408 by thePOST empty detect circuit 410, the empty₋₋ post signal is asserted. Onthe next shift cycle (Φ1), when output is requested from PRE 402 or POST408, the load₋₋ post signal is asserted. In response to the load₋₋ postsignal, the seven leftmost bits of the PRE register 402 are loaded intothe rightmost seven bits of the POST register 408 by the PRE to POSTcircuit 404, while the left most bit in the POST register 408 is loadedwith a one (`1`) bit. The fight most bit off the PRE register 402 issent to the DATAO register 422. The remainder of the time when a bit isrequested by the Select Circuit 406, it is shifted out of the POSTregister 408, and a zero (`0`) bit is shifted in to replace it.

FIGS. 15 through 17 are flow charts showing a virtual implementation ofthe Framer 112 Transmit (Tx) function. FIG. 15 shows the high levelfunctionality. The Framer is activated, step 450, and the Tx functioninitializes 452 (see FIG. 17). A loop is entered and a check is madewhether more bits need to be processed, step 454. If no more bits areneeded, step 454, the Framer 112 terminates, step 456. Otherwise, onebit ("Masked bit") is shifted out of the MASK register 412, step 458. Acheck is made whether in transparent mode, step 460. If in Transparentmode, step 480, a Databit is extracted from the POST register, step 462(see FIG. 16). Otherwise, the Masked bit is checked. If it is set, theDatabit is set to a constant one ("1"), step 466. Otherwise, the DATAregister 420 is checked using the FONES detect circuit 416 for five onebits, step 468. If five one bits were detected, step 468, zero insertionis required, and Databit is set to zero ("0"). Otherwise, if the MaskedBit is set, step 464, and FONES is not set, step 466, a Databit isextracted from the POST register, step 462 (see FIG. 16). Regardless ofthe paths taken above, the Databit is shifted into both the DATAregister 420 and the DATAO register 422. Finally, the loop iterates,starting With the test of more bits to send, step 454.

FIG. 16 is a flow chart showing the operation of the Get Databit fromPOST functionality shown in step 462 of FIG. 15. A check is made by thePOST empty detect circuit 410 for binary `00000001` in the POST register408, step 476. The `00000001` value indicates that the POST register 408is empty. In that case, POST 408 is loaded from PRE 402, step 478, onebit is then shifted out of POST to be used as the Databit and the bitshifted out of POST 408 is replaced by a one (`1`) bit shifted in, step480. Finally, the "NW" flag is negated, step 482, indicating that a newoutput word of data is required for the next Framer 112 activation. Onthe other hand, when the POST register 408 contains other than`00000001`, one bit is shifted out of the POST register 408 to be usedas the Databit, step 484. This Databit is replaced in the POST register408 by a zero ("0") bit shifted in. In any case, the function returns,step 486 to FIG. 15.

FIG. 17 is a flow chart showing how the Transmit (Tx) Framerfunctionality is initialized. The "NW" flag is tested, step 490. If "NW"is not asserted, step 490, the PRE register 402 is loaded from the SERINregister, step 492 and the "NW" flag is latched to a one ("1") status,step 494. In any case, the DATA loop is initialized to iterate eighttimes, step 496, and the functionality exits to back to FIG. 15, step498.

Returning to the discussion of the CPM 24 components, FIG. 18 shows amemory map of the Dual Ported RAM (DPR) 84 and External Memory 190utilized by the CPM 24 to control the Framer 112. The base table in DPR84 is the Global Parameter Table 180 that always starts at a fixedlocation 198 in DPR 84. The table entries and their definitions areshown in Table T-15.

                  TABLE T-15                                                      ______________________________________                                        Global Parameter Table                                                        Adr  Len    Name       Description                                            ______________________________________                                        00   04     MCBASE     Multichannel base pointer                              04   02     QMCSTATE   Multichannel controller state                          06   02     MRBLR      Maximum receive buffer length                          08   02     Tx.sub.-- S.sub.-- PTR                                                                   TSATTx pointer                                         0a   02     RxPTR      Current TSATRx time slot entry                         0c   02     GRFTHR     Global Receive frame threshold                         0e   02     GRFCNT     Global receive frame count                             10   04     INTBASE    Multichannel Interrupt table base address              14   04     INTPTR     Current interrupt queue pointer                                               (INTBASE)                                              18   02     Rx.sub.-- S.sub.-- PTR                                                                   TSATRx pointer                                         1a   02     TxPTR      Current TSATTx time slot entry                         1c   02     C.sub.-- MASK32                                                                          CRC Constant (debb20e3)                                20   40     TSATRx     Time slot assignment table - Rx                        60   40     TSATTx     Time slot assignment table - Tx                        a0   04     C.sub.-- MASK16                                                                          CRC Constant (f0b8)                                    a4   04     TEMP.sub.-- RBA                                                   a8   08     TEMP.sub.-- CRC                                                   ______________________________________                                    

Table T-16 shows a Time Slot Assignment (TSA) table. The GlobalParameter Table contains two such tables: a Receive Time Slot AssignmentTable (TSATRx) and a Transmit Time Slot Assignment Table (TSATTx). Eachof the two TSA tables consists of thirty-two sixteen bit entries. Notethough that access to the TSA tables is indirect via the Tx₋₋ S₋₋ PTRand Rx₋₋ S₋₋ PTR pointers. This provides a mechanism for sharing thetables between Transmit (Tx) and Receive(Rx) functions.

                  TABLE T-16                                                      ______________________________________                                        Time Slot Assignment Table                                                    0f     0e     0d 0c   0b   0a 09 08 07 06                                                                          05 04 03 02 01 00                        ______________________________________                                        00   V     W      M(7:6)                                                                              0    Channel Pointer                                                                         Mask (5:0)                             01   V     W      M(7:6)                                                                              0    Channel Pointer                                                                         Mask (5:0)                             02   V     W      M(7:6)                                                                              0    Channel Pointer                                                                         Mask (5:0)                             1e   V     W      M(7:6)                                                                              0    Channel Pointer                                                                         Mask (5:0)                             1f   V     W      M(7:6)                                                                              0    Channel Pointer                                                                         Mask (5:0)                             ______________________________________                                    

Table T-17 contains definitions for the Time Slot Assignment (TSA) Tablefields. In the case of TDM, the TSA Table is scanned once for eachcycle. For example, in the case of a T1 transmission, a cycle startswhen a sync signal is received (see L1SYNC 204 in FIG. 23). Idles aretransmitted if the Valid Bit (V) for a channel is not set. Eight bits ofeither data or idle are transmitted for each channel until a Wrap (W)flag is encountered. The remainder of the channels, if any, are ignoreduntil the next sync signal is received. The RxPTR and TxPTR Global Tableentries point at the TSA entries currently being processed.

                  TABLE T-17                                                      ______________________________________                                        Field Name Description                                                        ______________________________________                                        V          Valid bit                                                                     0 = data in this time slot totally ignored                                    1 = data in time slot read/written                                 W          Wrap                                                                          0 = not last time slot in table                                               1 = the last time slot in table                                    Mask (7:6) top two bits of mask                                               Channel Pointer                                                                          channel number (0-31) used to index into channel                              tables                                                             Mask (5:0) bottom six bits of mask.                                           ______________________________________                                    

Each valid Time Slot Assignment (TSA) entry points to a Channel SpecificParameter (Channel) Table 186, 187, 188, in low DPR 84 memory. Note thatmultiple TSA entries may point at the same Channel Specific ParameterTable. This is done in two situations: when a channel simultaneouslysupports both input and output, and for Superchannels.

Indexing is done by multiplying the size of the Channel SpecificParameter Table (hex 40) by the Channel Pointer in the TSA entry andadding this product to a fixed base address 196. Preferably, themultiplication is optimized by appending six low order zeros to theChannel Pointer.

Table T-18 shows layout of the Channel Specific Parameter (Channel)Tables 186, 187, 188. Three Channel tables are shown: channel 0 186,channel 1 187 and channel j 188.

                  TABLE T-18                                                      ______________________________________                                        Channel Specific Parameter Table                                              Adr  Len    Name      Description                                             ______________________________________                                        00   02     TBASE     Tx Buffer Descriptor (BD) base address                  02   02     CHAMR     Channel mode register                                   04   04     TSTATE    TX Interna1 State                                       08   04               Tx Interna1 Data Pointer                                0c   02     TBPTR     Tx Buffer Descriptor Pointer                            0e   0                Tx Interna1 Byte Count                                  10   04     TUPACK    Tx Temp - UnPack 4 bytes from 1 long                    14   04     ZISTATE   Zero Insertion Machine State                            18   02     TCRC      Temp Transmit CRC                                       1c   02     INTMASK   Channel's interrupt mask flags                          1e   02     BDflags   Temp                                                    20   02     RBASE     Rx Buffer Descriptors (BD) base address                 22   02     TMRBLR    Maximum receive buffer length                           24   04     RSTATE    Rx Interna1 State                                       28   04               Rx Interna1 Data Pointer                                2c   02     RBPTR     Rx Buffer Descriptor Pointer                            2e   02               Rx Interna1 Byte Count                                  30   04     RPACK     Rx Temp - packs 4 bytes to 1 long                       34   04     ZDSTATE   Zero Deletion Machine State                             38   04     RCRC      Temp receive CRC                                        3c   01     TRNSYNC   Transparent synchronization (Superchannels)             3e   02     TMP.sub.-- MB                                                                           temp (min(MAX.sub.-- cnt,Rx int. byte                   ______________________________________                                                              cnt))                                               

The Channel Tables 186, 187, 188 contain a number of fields relevant tothis disclosure. The CHAMR field contains the Channel Mode Registershown below in Table T-23. TSTATE and RSTATE contain the Transmit (Tx)state and the Receive (Rx) state, respectively, returned in SR2 176 fromthe latest Framer 112 activations. The contents of these fields areshown above in Table T-5. ZISTATE and ZDSTATE contain the Zero Insertmachine STATE and the Zero Delete machine STATE furnished to andreceived from the Framer 112 in register SR3 178 when performing ZeroInsertion and Zero Deletion. The contents of these fields are shownabove in Table T-7. TRNSYNC is used to synchronize Superchannels. Thehigh order byte contains the number of the first timeslot utilized whenreceiving, and the low order byte contains the number of the firsttimeslot utilized when transmitting.

The Channel Tables 186, 187, 188 also contain pointers 189 to TransmitBuffer Descriptor (BD) tables (TBASE) and receive BD tables (RBASE) forthe channels. A Channel table will have both a transmit and a receive BDpointer if the corresponding channel supports both modes. In FIG. 18,both a Receive BD (RxBD) table 192, and a Transmit BD (TxBD) table 193are shown for channel j 188. The base address of each BD table 192, 193is computed by adding 194 the channel table pointers 189 to a BD tablebase address 182.

Table T-19 shows the layout of a Receive Buffer Descriptor (RxBD) tableentry.

                                      TABLE T-19                                  __________________________________________________________________________    RECEIVE BUFFER DESCRIPTOR (Rx BD)                                             0f   0e                                                                              0d 0c                                                                              0b                                                                              0a                                                                              09 08 07                                                                              06                                                                              05                                                                              04 03                                                                              02                                                                              01                                                                              00                                       __________________________________________________________________________    0  E --                                                                              W  I L F CM -- UB                                                                              --                                                                              LG                                                                              NO AB                                                                              CR                                                                              --                                                                              --                                       2  Data Length                                                                6  Rx Data Buffer Pointer                                                     __________________________________________________________________________

A Receive Buffer Descriptor (RxBD) table consists of one or more RxBDentries arranged sequentially in memory. The RxBD table is terminatedwith an entry that has its Wrap (W) flag set. The RBPTR pointer in theChannel table points at the current RxBD table entry. Table T-20contains definitions of the RxBD table entry fields.

                  TABLE T-20                                                      ______________________________________                                        Receive Buffer Fields                                                         Field Name                                                                             Description                                                          ______________________________________                                        E        Empty                                                                         0 = data buffer has been filed or aborted                                     1 = data buffer associated with BD is empty                          W        Wrap (final BD in Table)                                                      0 = Not last buffer descriptor in BD table                                    1 = last buffer descriptor in BD table                               I        Interrupt                                                                     0 = RXB is not set after buffer used                                          1 = RXB or RXF bit will be set when buffer has been                           .sup.   used by HDLC controller                                      L        Last in Frame                                                                 0 = Buffer not last in a frame                                                1 = Buffer the last in a frame                                       F        First in Frame                                                                0 = Buffer is not first in a frame                                            1 = Buffer is the first in a frame                                   CM       Continuous Mode                                                               0 = Normal operation                                                          1 = Empty bit not set by CP after BD closed allows                            .sup.   buffer overwrite when next accessed                          UB       User bit - untouched by CP                                           LG       Rx Frame Length Violation                                            NO       Rx Nonoctet Aligned Frame                                            AB       Rx Abort Sequence received                                           CR       Rx CRC Error detected in frame                                       Data Length                                                                            Number of octets written by CP into BD's data buffer.                         When last BD (L = 1), length contains the total number                        of frame octets received.                                            Rx Buffer Ptr                                                                          Pointer to receive buffer                                            ______________________________________                                    

Table T-21 shows the layout of a Transmit Buffer Descriptor (TxBD) tableentry. It is similar to the RxBD table shown in Table T-19.

                                      TABLE T-21                                  __________________________________________________________________________    TRANSMIT BUFFER DESCRIPTOR (Tx BD)                                            0f   0e 0d                                                                              0c 0b                                                                              0a 09 08 07                                                                              06 05                                                                              04                                                                              03 02 01 00                                  __________________________________________________________________________    0  R -- W I  L TC CM -- UB                                                                              -- --                                                                              --                                                                              Pad                                          2  Data Length                                                                6  Tx Data Buffer Pointer                                                     __________________________________________________________________________

A Transmit Buffer Descriptor (TxBD) table consists of one or moresequentially arranged TxBD entries where the table is terminated with aTxBD entry with the Wrap (W) bit set. The current TxBD table entry beingprocessed for a channel is indexed by the TBPTR entry in the Channeltable. Table T-22 contains the TxBD table entry definitions.

                  TABLE T-22                                                      ______________________________________                                        Transmit Buffer Fields                                                        Field Name                                                                             Description                                                          ______________________________________                                        R        Ready                                                                         0 = data buffer associated with BD not ready yet                              .sup.   Bit cleared after BD transmitted or error.                            1 = data buffer associated with BD is ready but has not                       .sup.   yet been transmitted.                                        W        Wrap (final BD in Table)                                                      0 = Not last buffer descriptor in BD table                                    1 = last buffer descriptor in BD table                               I        Interrupt                                                                     0 = No interrupt generated after buffer serviced                              1 = TXB in HDLC circular interrupt table entry will be                        .sup.   set after buffer serviced. This may cause an                          .sup.   interrupt (if enabled).                                      L        Last in Frame                                                                 0 = Buffer not last in a frame                                                1 = Buffer the last in a frame                                       TC       Tx CRC (only valid if L = 1)                                                  0 = Transmit closing flag after last data byte                                1 = Transmit CRC after last data byte (then flag)                    CM       Continuous Mode                                                               0 = Normal operation                                                          1 = Empty (E) bit not set by CP after BD closed allows                        .sup.   overwrite of buffer when next accessed by CP                 UB       User bit - untouched by CP                                           PAD      Number of pad PAD characters (7E or 7F) that                                  transmitter will send after closing flag.                            Data Length                                                                            Number of bytes to transmit from buffer                              Rx Buffer Ptr                                                                          Pointer to buffer from which to transmit                             ______________________________________                                    

Controlling high level operation of the Channel is the Channel ModeRegister (CHAMR) found in the Channel Table shown in Table T-18. TheCHAMR flags and bit allocations are illustrated in Table T-23.

                  TABLE T-23                                                      ______________________________________                                        CHAMR (Channel Mode Register)                                                 0f  0e    0d    0c  0b  0a  09  08  07  06  05  04                                                    03  02    01 00                                       ______________________________________                                        M   R     1     E   0   S   --  P   0   0   0   0                                                     0   0     0  0                                                                O   D      N  Y  O                                                            D          T  N  L                                                            E            C                                        ______________________________________                                    

Table T-24 contains descriptions of the Channel Mode Register flagsshown in Table T-23.

                  TABLE T-24                                                      ______________________________________                                        CHAMR Fields                                                                  Field Name Description                                                        ______________________________________                                        MODE       Mode                                                                          1 = HDLC                                                                      0 = Transparent                                                    RD         Reverse Data                                                                  0 = Transmit LSB first                                                        1 = Transmit MSB first                                             ENT        Enable Transmit                                                               0 = send idles (1's) in this timeslot                                         1 = send data                                                      SYNC       Synchronization                                                               0 = first byte sent in first timeslot                                         1 = use TRNSYNC to determine 1st byte sent                         POL        Enable Polling                                                                0 = Ignore BD R bits                                                          1 = Check BD R bits for output data                                ______________________________________                                    

FIG. 19 is a diagram showing the operation of TDM Channels. TimeDivision Multiplexing (TDM) is a technique that allows severalcommunications channels to share the same physical media. The datastream of each channel is divided into a number of smaller packages.Each of the channels is then assigned a small portion of the TDM line ina repetitive pattern. This is called a timeslot.

As illustrated above in Tables T-1 and T-2, T1 multiplexes 24 eight-bittime slots or channels onto a 193 bit frame, while E1 multiplexes 32eight bit channels onto a 256 bit frame. Each channel is allocated eightbits of the input or output stream. The next channel is allocated thenext eight bits.

For synchronous data communications, a clock must be provided by eithera modem or the receiver. In FIG. 19, a clock signal, L1CLK 202, isshown. The signal shows eight full clock cycles per eight bit byte, codeword, or channel slot. This is illustrative only, as the ratio betweenclock cycles and I/O bits may not be one-to-one.

A sync signal, L1SYNC 204, is also shown. It can be generated based onthe sync patterns in T1 and E1 communications as shown in Tables T-1 andT-2. A sync signal will be asserted at the beginning of each T1 or E1frame.

The beginning of seven TDM frames are shown in FIG. 19. The first sixtimeslots in each of the seven TDM frames are also shown. In TDM Frame#1, eight bits of CH1/Byte1 are sent or received, followed by eight bitsof CH2/Byte1, etc. TDM Frame #1 is followed by TDM Frame #2, whichbegins with eight bits of CH1/Byte1.

FIG. 20 is a diagram related to FIG. 19 further showing TDM operation.It shows actual data for the first six time slots of seven frames. TimeSlot #1 has a four byte message (D1, D2, D3, D4) delimited by HDLC flags(7E). Note that in normal HDLC operation, a new message could havestarted in TDM Frame #7, sharing the flag in TDM Frame #6 with themessage that ended in TDM Frame #5. Time Slot #2 has the first fourbytes of a message (D1, D2, D3, D4) following three flag bytes (7E).Time Slots #3, #5, and #6 each have seven bytes of messages. Time Slot#4 is idle, defined as solid one bits (FF). It should be noted that thisexample shows flags and data being byte aligned in the TDM Frames. Thisis for illustrative purposes only since HDLC bit stuffing will causebyte alignment to be quickly lost.

FIG. 21 is a block diagram showing input and output operation on a TDMline. The RISC Controller 50 communicates with SCCs 60, 62, 64, 66 (seeFIG. 2) with First-In/First-Out (FIFO) queues. Each SSC has an inputFIFO queue 56 and an output FIFO queue 58. In the currentimplementation, SSC1 60 has 32 byte FIFO queues, and the other SSCs 62,64, 66 have 16 byte FIFO queues. SSC1 60 is thus preferred for T1 and E1communications due to the high transfer rate involved.

As an SSC receives input bits from a communications line 28, the bitsare shifted into an input shift register 57 until eight bits have beenaccumulated, at which time the eight bits are placed in the SSC's inputFIFO queue 56. Output works in a similar manner. A byte at a time isplaced in the output shift register 59. Bits are shifted out of theoutput shift register 59 a bit at a time until all eight bits in thebyte have been transmitted out onto the communications line 28. At thattime, another byte is removed from the output FIFO queue 58 andtransmitted. Note that the FIFO queues 56, 58 in TDM mode contain onebyte for Time Slot #1, followed by one byte for Time Slot #2, etc. Thus,the SSC1 60 32 byte FIFO queues 56, 58 can contain one entire T1/E1frame.

Due to the high speeds of T1 and E1 lines, one problem that can arisewhen using 16 and 32 byte FIFO queues 56, 58 is that the RISC controller50 gets behind in inserting output bytes in an output FIFO queue 56, orremoving and processing input bytes from an input FIFO queue 58. Thisunderrunning and overrunning is fatal for all channels on thecommunications line.

One possible solution to this problem is to extend the size of the FIFOqueues 56, 58 so that they are long enough for worst case situations.This can get quite expensive in terms of silicon real estate. A bettersolution relies on understanding that the bulk of the RISC Controller 50processing is done at the beginning and end of HDLC blocks. One reasonfor this is the necessity of allocating and deallocating buffers atthese times. Worst case of course is when multiple TDM channels startand/or end HDLC blocks at the same time.

FIG. 22 is a block diagram showing this preferred solution. It isidentical with FIG. 21 with the addition of a Load Control module 98.

The Load Control module 98 detects when either the input FIFO 56 oroutput FIFO 58 queue becomes dangerously low in availability. If eitherthe input FIFO queue 56 is dangerously close to overflowing, or theoutput FIFO queue 58 is dangerously close to under flowing, a throttlesignal 99 is asserted. When the throttle signal 99 is asserted, the RISCcontroller 50 doesn't start or complete output blocks. Rather, itinserts flag bytes (7E) in the output FIFO queue 56 for each channel ortimeslot in which a block needs either to be started or completed. Theflag (7E) insertion is terminated when neither the input FIFO queue 56nor the output FIFO queue 58 is any longer in a dangerous condition andthe throttle signal 99 is no longer asserted.

Referring back to FIG. 20, operation of this solution can be seen. InTime Slot #1, a second flag byte (7E) is shown inserted at the end ofthe block. Likewise, Time Slot #2 shows multiple flag bytes (7E) beforethe beginning of a block. It should be noted that the HDLC protocolrequires that empty blocks are ignored on input. These empty blocksoccur when flag bytes (7E) are adjacent. Thus, the four byte block shownin Time Slot #1 can be processed as a complete block by the receiver,even while kept open by the transmitter.

FIG. 23 is a block diagram that shows implementation of TDMSuperchannels. Following L1SYNC 204 in FIG. 23 are the multiple timeslots 206 that constitute a TDM frame. This allocation is repeated foreach frame. Corresponding to each eight bit time slot is a TDM channel208.

In a TDM Superchannel, more than one TDM channel 208 is assigned to asingle logical channel 212, 216. In FIG. 23, logical channel CH1 212 isassigned to two TDM channels: one corresponding to Time Slot 1, and theother to Time Slot 2. Likewise logical channel CH3 216 is assigned toTDM channels corresponding to Time Slots 4 and 5. Contrast these twoSuperchannels with conventional channels such as CH2 214 assigned to theTDM channel corresponding to Time Slot 3, and CH4 218 assigned to theTDM channel corresponding to Time Slot 6.

Each logical channel has a corresponding input queue and an outputqueue. Thus, logical channel CH1 212 utilizes the CH1 queue 222, logicalchannel CH2 214 utilizes CH2 queue 224, logical channel CH3 216 utilizesCH3 Queue 226, and logical channel CH4 218 utilizes the CH4 Queue 228.

It should first be noted that there is no reason that the TDM channelsthat constitute a Superchannel need to be adjacent. Also note that thebits in a Superchannel are treated as if they were continuous. In theexample shown in FIG. 23, for output on logical channel CH1 212, bytesare sequentially retrieved from the CH1 channel 222. The bits in theretrieved bytes are "bit stuffed" into HDLC frames. The first eight bitsin the resulting sequential stream of bits are transmitted in Time Slot1, followed by the next eight bits in Time Slot 2. This is repeated forsuccessive frames.

One problem encountered when implementing TDM Superchannels is that ifoutput on a Superchannel does not start with the first actual time slotassigned to a Superchannel, the receiver can get out of sync. This caneasily happen if care is not taken when implementing Superchannels.

FIG. 24 is a block diagram showing the relationship among tables for animplementation solving that problem. The same Time Slots 206 and TDMchannels 208 are shown as were shown in FIG. 23. Each TDM channel has achannel entry. The TS1 Link 231 is logically connected to CH1/Byte0, TS2Link 232 is logically connected to CH1/Byte1, TS3 Link 233 is logicallyconnected to CH2/Byte0, TS4 Link 234 is logically connected to CH3/Byte0, TS5 Link 235 is logically connected to CH3/Byte 1, and the TS6 Link236 is logically connected to CH4/Byte0.

Each of the logical channel entries is also connected logically to aLogical Channel table. Each logical channel table has a ready flag 252,254, 256, 258, an active flag 262, 264, 266, 268, and an output queue272, 274, 276, 278.

Preferably, there should also be available means for determining whethera given time slot is the first time slot for a given logical channel. Inthe example given, there is a field associated with each logical channelthat contains a pointer or index identifying the first correspondingtime slot. In the example, logical channel CH1 first 242 contains a one,indicating that it the first associated time slot is time slot 1. CH2first 244 contains a 3 indicating that time slot 3 is its first (andonly) associated time slot. Likewise the CH3 First entry 246 contains a4 associating it with Time Slot 4, and CH4 First 248 contains a 6associating it with time slot 6. Note though that other means foridentifying the first time slot in a logical channel may be used.Another way to accomplish this would be to utilize a flag for each timeslot.

When implemented utilizing the tables shown in FIG. 18 and Table T-15through T-22, the Global Table 180 contains pointers Tx₋₋ S₋₋ PTR andRx₋₋ S₋₋ PTR that point at send (Tx) and receive (Rx) Time SlotAssignment tables. The actual Time Slot Assignment tables are located atlocations TSATRx and TSATTx in the Global Table 180. Note that thisarrangement allows the two time slot assignment tables to be shared.

The correspondence between TSA entries and time slots 206 is implicit inthe ordering of the TSA entries in a TSA table: the first TSA entry in aTSA table corresponds to the first time slot after the sync signal, andthe second TSA entry corresponds to the second time slot, etc.

Each TSA entry has a Channel Pointer (Table T-16). The Channel Pointeris used to identify the corresponding logical channel. Thus both the TS1Link 231 and TS2 Link 232 contain (1), pointing to the same ChannelTable (1). The low order byte of the TRNSYNC field in the Channel Table(Table T-18) is used to identify the first time slot in a Superchannel.Thus, in the Channel 1 table (CH1 First 242), the byte in the TRNSYNCfield will contain a 1, corresponding to Time Slot 1, while thecorresponding byte in the Channel 2 table will contain a 3, identifyingTime Slot 3.

The Channel Ready function 252, 254, 256, 258 is accomplished byutilizing the "POL" field in the Channel Mode Register (Table T-23) inthe Channel Table (Table T-18). After data is enqueued for output in theTransmit Buffers, the "POL" flag is set. The Channel Active function262, 264, 266, 268 is accomplished by utilizing information in the loworder bits of the TSTATE field in the Channel Table (Table T-18).Finally, the output queue 272, 274, 276, 278 functionality isaccomplished by utilizing Transmit Buffer Descriptors (BD) (Table T-21)in a Transmit BD Table 193 (see FIG. 18).

FIG. 25 is a flow chart that illustrates both throttle flag (7E)insertion and Superchannel synchronization. The routine is entered eachtime the RISC Controller 50 inserts an eight bit byte into the outputFIFO queue 58. If necessary, the time for transmitting the next timeslot is awaited, step 282. Once the time slot is available in the outputFIFO queue 58, the index to the corresponding Channel Table isdetermined by utilizing the time slot as an index into a link table,step 284. In the embodiment disclosed above, the Channel Table index orChannel Number is extracted from the Channel Pointer field of theTransmit Time Slot Assignment Table (Table T-16).

Once the appropriate channel table has been determined, step 284, acheck is made whether I/O is active, step 286. If not, a check is thenmade whether this is the first time slot in a Superchannel, step 288. Inthe disclosed embodiment, this is done by comparing the low order byteof TRNSYNC in the Channel Table with the Channel Number. If this is thefirst time slot for the channel, a check is made whether I/O is ready,step 290. This is done in the disclosed embodiment by testing the "POL"flag in the Channel Mode Register for the channel. If either not thefirst time slot, step 288, or output is not ready, step 290, an Idle(FF) byte is placed in the output FIFO queue 58, step 289, beforeexiting, step 298.

If the channel is not active, step 286, but this is the first time slotin a Superchannel, step 288, and the channel is ready for output, step290, a check is made for throttling, step 292. If the throttling signal99 is asserted, step 292, a flag (7E) byte is placed in the output FIFOqueue 58, step 291, before exiting, step 298. Otherwise, a new HDLCblock is started and I/O is set active, step 293, before exiting, step298.

In the case where the channel was already active, step 286, a check ismade whether there is more data to transmit on the channel, step 294.This can be determined in the disclosed embodiment by checking theBuffer Descriptors (BDs) in the Transmit BD Table 193 for the Channel.If more output is available, step 294, one byte is placed in the outputFIFO queue 58, step 295, before exiting, step 298. Otherwise, a check ismade for throttling, step 296. If not throttling, step 296, the frame iscompleted and the active flag is cleared, step 298, before exiting, step298. The block completion, step 297, may require transmitting a CRC andclosing flag (7E). If throttling though, step 296, instead of finishingthe block, step 297, a flag (7F) is placed in the output FIFO 58, step299, for that time slot before exiting, step 298 and the block isconsidered still open.

The above routine efficiently guarantees that transmission on aSuperchannel will always start in a selected time slot assigned to theSuperchannel. It was assumed above that the time slot selected as firstis the first time slot in the Superchannel. But a closer look at theimplementation disclosed reveals that this is not necessary. Rather thelow order byte of TRNSYNC can be initialized with any time slot numberin a Superchannel, and the Superchannel will always start transmittingin that time slot.

A similar routine can be utilized for receiving data on a TDMSuperchannel. In this case, the high order byte of TRNSYNC contains thetime slot number of the first time slot to receive data. This allowsincoming data in the other time slots in a Superchannel to be ignoreduntil art opening HDLC flag is found in the first time slot. Of course,a receiver can also be configured to look for an opening flag in anytime slot in a Superchannel. Finally note that in both routines,channels that are not part of Superchannels can be treated asSuperchannels with just one time slot.

Those skilled in the art will recognize that modifications andvariations can be made without departing from the spirit of theinvention. Therefore, it is intended that this invention encompass allsuch variations and modifications as fall within the scope of theappended claims.

We claim:
 1. A method of synchronizing Time Division Multiplexer (TDM)Superchannels, wherein:a data stream transmitted as signals over a highspeed link is divided into a plurality of fixed length divisions, eachof the plurality of fixed length divisions corresponds to one of aplurality of time slots on a cyclical basis, each of one or more logicalchannels is assigned a different set of one or more of the plurality oftime slots, and at least one of the one or more logical channels is aSuperchannel, wherein:each said Superchannel is assigned two or more ofthe plurality of time slots, and each said Superchannel has a first timeslot,said method comprising the steps of: (a) determining whether outputis active on a selected Superchannel; (b) determining whether a giventime slot is the first time slot of the selected Superchannel; (c)determining whether output is available for the selected Superchannel;(d) starting output for the selected Superchannel in the given time slotwhen output was determined not to be active in step (a), the given timeslot was determined to be the first time slot in step (b), and outputwas determined to be available in step (c); and (e) postponing startingoutput for the selected Superchannel in the given time slot when outputwas determined not to be active in step (a) and the given time slot wasdetermined not to be the first time slot in the selected Superchannel instep (b).
 2. The method in claim 1 wherein:the high speed link utilizesa T1 signal consisting of 24 eight bit time slots plus one framing bitper 193 bit frame transmitted every 125μ Seconds.
 3. The method in claim1 wherein:the high speed link utilizes an E1 signal consisting of 32eight bit time slots per 256 bit frame transmitted every 125μ Seconds.4. The method in claim 1 wherein:said plurality of the fixed lengthdivisions are eight bit code words.
 5. The method in claim 1 whichfurther comprises:(f) storing a plurality of channel tables in a Memory,wherein:each channel table corresponds to a different one of the one ormore logical channels.
 6. The method in claim 5 wherein step (b)comprises:(1) testing an index corresponding to the given time slotagainst an entry in a corresponding channel table.
 7. The method inclaim 5 wherein step (c) comprises:(1) identifying an output buffer poolfrom an entry in a channel table corresponding to the given time slot;and (2) testing the output buffer pool identified in substep (1) foravailable output.
 8. The method in claim 1 wherein:data on at least oneof the one or more logical channels is transmitted in HDLC format. 9.The method in claim 8 wherein within step (e):HDLC idle bits aretransmitted.
 10. A method of synchronizing Time Division Multiplexer(TDM) Superchannels, wherein:a data stream transmitted as signals over ahigh speed link is divided into a plurality of fixed length divisions, aplurality of the fixed length divisions are eight bit code words, eachof the plurality of fixed length divisions corresponds to one of aplurality of time slots on a cyclical basis, each of one or more logicalchannels is assigned a different set of one or more of the plurality oftime slots, and at least one of the one or more logical channels is aSuperchannel, wherein:each said Superchannel is assigned two or more ofthe plurality of time slots, and each said Superchannel has a first timeslot,said method comprising the steps of: (a) storing a plurality ofchannel tables in a Memory, wherein: each channel table corresponds to adifferent one of the one or more logical channels; (b) determiningwhether output is active on a selected Superchannel; (c) determiningwhether a given time slot is the first time slot of the selectedSuperchannel by testing an index corresponding to the given time slotagainst an entry in a corresponding channel table; (d) determiningwhether output is available for the selected Superchannel; (e) startingoutput for the selected Superchannel in the given time slot when outputwas determined not to be active in step (b), the given time slot wasdetermined to be the first time slot in step (c), and output wasdetermined to be available in step (d); and (f) postponing startingoutput for the selected Superchannel in the given time slot when outputwas determined not to be active in step (b) and the given time slot wasdetermined not to be the first time slot in the selected Superchannel instep (c).
 11. An apparatus for synchronizing Time Division Multiplexer(TDM) Superchannels, wherein:a data stream transmitted as signals over ahigh speed link is divided into a plurality by of fixed lengthdivisions; each of the plurality of fixed length divisions correspondsto one of a plurality of time slots on a cyclical basis; each of one ormore logical channels is assigned a different set of one or more of theplurality of time slots, and at least one of the one or more logicalchannels is a Superchannel; wherein:each said Superchannel is assignedtwo or more of the plurality of time slots, and each said Superchannelhas a first time slot,said apparatus comprising: (a) means fordetermining whether output is active on a selected Superchannel; (b)means for determining whether a given time slot is the first time slotof the selected Superchannel; (c) means for determining whether outputis available for the selected Superchannel; (d) means for startingoutput for the selected Superchannel in the given time slot when out-putwas determined not to be active by means (a), the given time slot wasdetermined to be the first time slot by means (b), and output wasdetermined to be available by means (c); and (e) means for postponingstarting output for selected Superchannel in the given time slot whenoutput was determined not to be active by means (a) and the given timeslot was determined not to be the first time slot in the selectedSuperchannel by means (b).
 12. The apparatus in claim 11 wherein:thehigh speed link utilizes a T1 signal consisting of 24 eight bit timeslots plus one framing bit per 193 bit frame transmitted every 125μSeconds.
 13. The apparatus in claim 11 wherein:the high speed linkutilizes an E1 signal consisting of 32 eight bit time slots per 256 bitframe transmitted every 125μ Seconds.
 14. The apparatus in claim 11wherein:said plurality of the fixed length divisions are eight bit codewords.
 15. The apparatus in claim 11 which further comprises:(f) aMemory; and (g) means for storing a plurality of channel tables in theMemory, wherein:each channel table corresponds to a different one of theone or more logical channels.
 16. The apparatus in claim 15 whereinmeans (b) comprises:(1) means for testing an index corresponding to thegiven time slot against an entry in a corresponding channel table. 17.The apparatus in claim 15 wherein means (c) comprises:(1) means foridentifying an output buffer pool from an entry in a channel tablecorresponding to the given time slot; and (2) means for testing theoutput buffer pool identified in subelement (1) for available output.18. The apparatus in claim 11 wherein:data on at least one of the one ormore logical channels is transmitted in HDLC format.
 19. The apparatusin claim 18 wherein within means (e):HDLC idle bits are transmitted. 20.An apparatus of synchronizing Time Division Multiplexer (TDM)Superchannels, wherein:a data stream transmitted as signals over a highspeed link is divided into a plurality of fixed length divisions, aplurality of the fixed length divisions are eight bit code words, eachof the plurality of fixed length divisions corresponds to one of aplurality of time slots on a cyclical basis, each of one or more logicalchannels is assigned a different set of one or more of the plurality oftime slots, at least one of the one or more logical channels is aSuperchannel, wherein:each said Superchannel is assigned two or more ofthe plurality of time slots, and each said Superchannel has a first timeslot,said apparatus comprising: (a) a Memory; (b) means for storing aplurality of channel tables in the Memory, wherein:each channel tablecorresponds to a different one of the one or more logical channels; (c)means for determining whether output is active on a selectedSuperchannel; (d) means for determining whether a given time slot is thefirst time slot of the selected Superchannel by testing an indexcorresponding to the given time slot against an entry in a correspondingchannel table; (e) means for determining whether output is available forthe selected Superchannel; (f) means for starting output for theselected Superchannel in the given time slot when output was determinednot to be active by means (c), the given time slot was determined to bethe first time slot by means (d), and output was determined to beavailable by means (e); and (g) means for postponing starting output forthe selected Superchannel in the given time slot when out-put wasdetermined not to be active by means (c) and the given time slot wasdetermined not to be the first time slot in the selected Superchannel bymeans (d).
 21. An apparatus for synchronizing Time Division Multiplexer(TDM) Superchannels, wherein:a data stream transmitted as signals over ahigh speed link is divided into a plurality of fixed length divisions,each of the plurality of fixed length divisions corresponds to one of aplurality of time slots on a cyclical basis, each of one or more logicalchannels is assigned a different set of one or more of the plurality oftime slots, at least one of the one or more logical channels is aSuperchannel, wherein:each said Superchannel is assigned two or more ofthe plurality of time slots, and each said Superchannel has a first timeslot,said apparatus comprising: (a) electronic circuitry for determiningwhether output is active on a selected Superchannel; (b) electroniccircuitry for determining whether a given time slot is the first timeslot of the selected Superchannel; (c) electronic circuitry fordetermining whether output is available for the selected Superchannel;(d) electronic circuitry for starting output for the selectedSuperchannel in the given time slot when output was determined not to beactive by circuitry (a), the given time slot was determined to be thefirst time slot by circuitry (b), and output was determined to beavailable by circuitry (c); and (e) electronic circuitry for postponingstarting output for the selected Superchannel in the given time slotwhen output was determined not to be active by circuitry (a) and thegiven time slot was determined not to be the first time slot in theselected Superchannel by circuitry (b).